<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>test</title>
    <!--<script type="text/javascript" src="../lib/jquery.min.js"></script>-->
    <!--<script type="text/javascript" src="../lib/miniui/miniui.js"></script>-->
    <!--<link type="text/css" href="../lib/miniui/themes/default/miniui.css"></link>-->
    <!--<link type="text/css" href="../lib/miniui/themes/icons.css"></link>-->
    <link type="text/css" href="css/css1.css"></link>
    <script type="text/javascript" src="../lib/boot.js"></script>
    <script type="text/javascript" src="../src/minix.js"></script>
</head>

<body>
<div>
    <input type="button" value="测试基本对象" onclick="click1()"/>
    <input type="button" value="嵌入页面上div2区域的内容" onclick="click2()"/>
    <input type="button" value="iframe以页面方式嵌入主页面" onclick="click3()"/>
    <input type="button" value="iframe内容以div方式签入主页面" onclick="click4()"/>
    <br>
    <input type="button" value="iframe内容以div方式弹出" onclick="click5()"/>
    <input type="button" value="iframe内容以完整页面弹出" onclick="click6()"/>
    <!--<input type="button" value="div2的内容弹出" onclick="click7()"/>-->
</div>

<div id="div1" style="border:2px solid #0fdf00; width:300px;min-height: 100px">

</div>
<div id="div2" style="border: 2px solid #ff0000">
    <h4>div2</h4>
    <input type="button" id="button1" value="button1"/>
    <input type="button" id="button2" value="button2"/>
    <input type="button" id="button3" value="button3"/>
    <input type="button" id="button4" value="button4"/>
    <input type="button" id="button5" value="button5"/>
</div>

<div id="form1">
    <input id="date1" name="BirthDay" class="mini-datepicker" value="2010-10-12" required="true"/>
</div>

<script type="text/javascript">
    function click1() {
        var page1 = new minix.page({
            hostContainer: 'div1',
            renderMode: 'div',
            renderContent: 'div2'
        });
        var page2 = $mx.createPage({
            hostContainer: 'div1',
            url: 'iframeContent.html',
            renderMode: 'div'
        });
    }

    function click2() {
        var page1 = new minix.page({
            hostContainer: 'div1',
            renderMode: 'div',
            renderContent: 'div2'
        });
        page1.inject();
    }

    function click3() {
        var page1 = new minix.page({
            hostContainer: 'div1',
            url: 'iframeContent.html',
            renderMode: 'iframe'
        });
        page1.inject();
    }

    function click4() {
        var page1 = new minix.page({
            hostContainer: 'div1',
            url: 'iframeContent.html',
            renderMode: 'div'
        });
        page1.inject();
    }

    function click5() {
        var page1 = new minix.page({
            url: 'iframeContent.html',
            renderMode: 'div',
            title: '页面来自于iframeContent.html'
        });
        page1.popup();
    }

    function click6() {
        var page1 = new minix.page({
            url: 'iframeContent.html',
            renderMode: 'iframe',
            title: '页面来自于iframeContent.html'
        });
        page1.popup();
    }

    function click7() {
        var page1 = new minix.page({
            renderMode: 'div',
            title: 'div2的内容',
            renderContent: 'div2'
        });
        page1.popup();
    }
</script>
</body>

</html>